<?php

if(!empty($_POST))
{
	$file='';

	if(!empty($_FILES['file']['name']))
	{
		$file = upload($_FILES['file']);	
	}
	
	$_POST['time'] = time();
	$_POST['file'] = $file;
	$re = insert('product', $_POST);
	if($re)
	{
		echo '10086';
		die;
	}
	else
	{
		echo '10087';
		die;
	}	
}
$news = selectAll('product');
$pro_cate = selectAll('pro_cate');
$cate = getcate($re);

include('app/admin/product/html/add.html');
?>